home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00008_Script_changeCursor < prev    next >
Text File  |  1999-04-25  |  3KB  |  96 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14.  
  15. property CRimage,CRmask,CDimage,CDmask,handImage,handMask
  16. --CRimage and CRmask are castNumbers of images used for custom rollover cursors
  17. --CDimage and CDmask are castNumbers of images used for custom mouseDown cursors
  18. on new me
  19.   
  20.   set handImage = the memberNum of member "handR-image" 
  21.   set handMask = the memberNum of member "handR-mask" 
  22.   
  23.   if the spriteNum of me = 6  then
  24.     --    if rolled over the plane image sprite 
  25.     --    in QTVR exterior always change cursor to hand
  26.     
  27.     set CRImage = the memberNum of member "handR-image" 
  28.     set CRmask = the memberNum of member "handR-mask" 
  29.     set CDimage = the memberNum of member "handD-image" 
  30.     set CDmask = the memberNum of member "handD-mask" 
  31.   else
  32.     set CRImage = the memberNum of member "cursorR-image" 
  33.     set CRmask = the memberNum of member "cursorR-mask" 
  34.     set CDimage = the memberNum of member "cursorD-image" 
  35.     set CDmask = the memberNum of member "cursorD-mask" 
  36.   end if
  37.   
  38.   
  39.   return me
  40. end
  41.  
  42.  
  43.  
  44. on getbehaviorDescription
  45.   return"changes the cursor on rollover and mousedown otherwise set it to the default"
  46. end
  47.  
  48. on mousedown me
  49.   cursor [CDimage,CDmask]
  50.   pass
  51. end
  52.  
  53. on mousewithin me
  54.   if the mousedown then
  55.   else 
  56.     cursor[CRimage,CRmask]
  57.   end if
  58.   updateStage
  59.   pass
  60. end
  61.  
  62. on mouseleave me
  63.   --  The enclosing if statement checks for a special case when 
  64.   --  we are  contolling cursors while in the plane Exterior. 
  65.   --  Then we want the default cursor to be the "hand"  instead of the "arrow" 
  66.   
  67.   global gSelct
  68.   
  69.   if (IAmInExterior (me)) and rollover(6) then
  70.     cursor [handImage,handMask]
  71.   else
  72.     cursor -1
  73.   end if
  74.   
  75.   updateStage
  76.   pass
  77. end
  78.  
  79. on mouseup
  80.   cursor[CRimage,CRmask]
  81.   pass
  82.   
  83. end
  84. on IAmInExterior me
  85.   global gselct,NumOfQTVRMenuItems, range
  86.   set qtvrPlaneSprNum = getSpriteNumFromMemberName("qtvranchor")+1
  87.   set range = NumOfQTVRMenuItems - 1
  88.   set exteriorSpriteNum = qtvrPlaneSprNum + range
  89.   if gselct = exteriorSpriteNum then
  90.     set value = TRUE
  91.   else
  92.     set value = FALSE
  93.   end if
  94.   return value
  95. end
  96.